home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
tm480.zip
/
TMEXAM.EXE
/
HVMENU.TSK
< prev
next >
Wrap
Text File
|
1991-09-10
|
8KB
|
334 lines
; Title : HVMENU.TSK Last Updated : June 12, 1991
; Author : Steve Johnson - FmP. Version : 1.10
; Purpose : Example of horizontal and vertical bounce-bar menus
; Notes : Whilst on a sub menu you may press left and right arrow
; keys which are programmed to drop down adjacent vertical menu.
; Note that each menu highlight is remembered for next time menu
; displayed.
; Latest : Main menu help only displayed on 2 second timeout
var formlist,1,occurs 6,' 12345'
var hilite_list,1,occurs 6 ;remembers sub menu options selected
var tname,8," HVMENU" ;For insertion into NO_FORMS only
int count ;decides colour of main menu help
int main_choice ;remembers main menu option selected
logical exit
hexvar safeopen,2cfaf4f3f5f0
var compare,6
var skey,10,'Secret'
int i
int pid1,pid2,pid3,pid4
vconst cls,11
vconst cel,55
vconst nor,5
vconst attn,79
END
lookfor "hvmenu.ovr"
if not found
insert tname tname
put "NO_FORMS"
stop
fi
forms hvmenu.ovr
display cls
put closed_safe wait 1 noclear
popget pid4
put part_closed_safe wait 1 noclear
popget pid1
put open_safe wait 1 noclear
popget pid2
put part_closed_safe wait 1 noclear
popget pid3
put closed_safe nowait
move 8000h to bbmask
move 2 to timer
MENU 1,"HORIZONTAL"
option 1,6
option 1,30
cursor 5 50 nor cel
ask exit attn 'Exit this task?'
cursor 5 50 nor cel
if not exit
return
fi
stop
option 1,1,5
move choice to main_choice
move 18H to bbmask ;activate left and right arrow keys
move entry main_choice of hilite_list to choice
PUT entry main_choice of formlist
move hilite to entry main_choice of hilite_list
move hilite_list to compare
encode compare using skey
cursor 5 50 nor 'Checking...'
if safeopen = compare
cursor 5 50 cel attn 'Well done...'
clear count
until count = 10
move count to delay
popdown pid1
wait 1
popdown pid2
wait 1
popdown pid3
wait 1
popdown pid4
wait 1
fi count
put fully_open_safe nowait
stop
else
cursor 5 50 cel 'Wrong combination'
fi
if choice = 42
userline nor "Right arrow"
increment main_choice
move main_choice to choice
RETURN 100
fi
if choice = 41
userline nor "Left arrow"
decrement main_choice
move main_choice to choice
RETURN 100
fi
move main_choice to choice
return
option 1,99
if count < 1
increment count
else
clear count
fi
if count = 0
put 'MMHELP1' nowait
else
put 'MMHELP2' nowait
fi
move hilite to choice
return
endm 1
stop
@video
@nf horizontal
@overlay
@bbmenu white,blue
{one } {two } {three } {four } {five } {EXIT }
@end
@nf mmhelp1
@colour char,white,blue
@window line 12,column 10,depth 4,width 30
This is the main menu. Press
<return> to drop down a sub-
menu. Select using <space>,
Arrow keys or 1st chars.
@end
@nf mmhelp2
@colour char,white,red
@window line 12,column 10,depth 4,width 30
This is the main menu. Press
<return> to drop down a sub-
menu. Select using <space>,
Arrow keys or 1st chars.
@end
@nf 1
@overlay
@colour char,blue,green
@dim
*one***
@bbmenu white,blue
{one }
{two }
{three }
{four }
{five }
@colour char,white,red
@bright
@window line 12,column 10,depth 4,width 30
This is sub menu one. Please
highlight a topic and press
<return> or press <left> or
<right> arrow key.
@END
@nf 2
@overlay
@colour char,blue,green
@dim
*two***
@bbmenu white,blue
{one }
{two }
{three }
{four }
{five }
@colour char,black,yellow
@window line 12,column 10,depth 4,width 30
This is sub menu two. Please
Highlight a topic and press
<return> or press <left> or
<right> arrow key.
@END
@nf 3
@overlay
@colour char,blue,green
@dim
*three*
@bbmenu white,blue
{one }
{two }
{three }
{four }
{five }
{six }
@colour char,black,red
@window line 12,column 10,depth 4,width 30
This is sub menu three. I
hope you realise that you
can press 1st character of a
topic to highlight it.
@END
@nf 4
@overlay
@colour char,blue,green
@dim
*four**
@bbmenu white,blue
{one }
{two }
{three }
{four }
@colour char,magenta,cyan
@bright
@window line 12,column 10,depth 4,width 30
This is sub-menu four. The
combination is encrypted.
The security would be higher
if the key was also...
@END
@nf 5
@overlay
@colour char,blue,green
@dim
*five**
@bbmenu white,blue
{one }
{two }
{three }
{four }
{five }
{six }
{seven }
@colour char,cyan,blue
@window line 12,column 10,depth 4,width 30
You can see the encryption
key by looking at the task
source. Perhaps you can
find a way to cheat?
@END
@nf closed_safe
@head left,HVMENU.TSK
@head right,'Taskmaster (c) FmP 1991'
@head centre,'A combination SAFE'
@banner
@win line20,column5,depth4,width40
The safe can be opened using
the correct combination of
selections from the secondary
menus...
@window line6,column47,depth14,width27
@gon
@colour char,white,black
@bright
7-------------------------9
0 7-------------------9 0
0 729 0 0
0 0 0 0 0
0 0 0 0 0
0 183 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 729 0 0
0 0 0 0 0
0 0 0 0 0
0 183 0 0
0 1-------------------3 0
1-------------------------3
@end
@nf fully_open_safe
@colour char,white,black
@window line6,column33,depth14,width41
@gon
@bright
7-------------------------9
7----------------9 0
0 7-----------9 729 7---------------9 0
0 0 0 0 0 07-------------90 0
0 0 Acme 0 0 0 00 Taskmaster 00 0
0 0 Safe 0 183 00 Source code00 0
0 0 Co. 0 0 00 7-------9 00 0
0 0 0 0 00 0 6 00 0
0 0 0 0 00 0 O 0 00 0
0 0 0 729 00 0 0 0 00 0
0 0 0 0 0 00 1-------3 00 0
0 0 0 0 0 01-------------30 0
0 1-----------3 183 1---------------3 0
1----------------3 0
1-------------------------3
@end
@nf part_closed_safe
@colour char,white,black
@window line6,column47,depth14,width27
@gon
@bright
7-------------------------9
0 7---------9 0
0 76 49-------9 0
0 00 00------90 0
0 00 00aster 00 0
0 16 00e code00 0
0 0 00----9 00 0
0 0 00 6 00 0
0 0 00O 0 00 0
0 76 000 0 00 0
0 00 00----3 00 0
0 00 00------30 0
0 16 43-------3 0
0 1---------3 0
1-------------------------3
@end
@nf open_safe
@colour char,white,black
@window line6,column47,depth14,width27
@gon
@bright
7-------------------------9
0 7----9 0
0 76 49------------9 0
0 00 00-----------90 0
0 00 00Taskmaster 00 0
0 16 00Source code00 0
0 0 00 7-------9 00 0
0 0 00 0 6 00 0
0 0 00 0 O 0 00 0
0 76 00 0 0 0 00 0
0 00 00 1-------3 00 0
0 00 00-----------30 0
0 16 43------------3 0
0 1----3 0
1-------------------------3
@end
@eof